/*
 * Copyright 2022-2029 heshuixing(https://gitee.com/heshuixing)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.mercury.ec.module.air.controller.admin.search.vo.xsfsi;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;

import static com.mercury.ec.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

/**
 * XSFSI 行程信息
 *
 * @author hesx
 */
@Schema(description = "管理后台 - XSFSI航段 Request VO")
@Data
public class AirXsfsiRouteReqVO {

    @Schema(description = "航司代码", requiredMode = Schema.RequiredMode.REQUIRED, example = "MU")
    @NotBlank(message = "航司代码不能为空")
    private String airlineNo;

    @Schema(description = "航班号", requiredMode = Schema.RequiredMode.REQUIRED, example = "MU1234")
    @NotBlank(message = "航班号不能为空")
    private String flightNo;

    @Schema(description = "舱位", requiredMode = Schema.RequiredMode.REQUIRED, example = "Y")
    @NotBlank(message = "舱位不能为空")
    private String cabin;

    @Schema(description = "出发城市三字码", requiredMode = Schema.RequiredMode.REQUIRED, example = "CAN")
    @NotBlank(message = "出发城市三字码不能为空")
    private String depart;

    @Schema(description = "到达城市三字码", requiredMode = Schema.RequiredMode.REQUIRED, example = "HKG")
    @NotBlank(message = "到达城市三字码不能为空")
    private String arrive;

    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @Schema(description = "航班日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-11-04")
    @NotNull(message = "航班日期不能为空")
    private LocalDate flightDate;

    @Schema(description = "出发时间(HH:mm)", requiredMode = Schema.RequiredMode.REQUIRED, example = "08:00")
    @NotBlank(message = "出发时间不能为空")
    private String departTime;

    @Schema(description = "抵达时间(HH:mm)", requiredMode = Schema.RequiredMode.REQUIRED, example = "08:00")
    @NotBlank(message = "抵达时间不能为空")
    private String arriveTime;
}
